
var list = document.querySelector(".list")
fetch("http://chst.vip:1234/api/getinlanddiscount")
.then(data=>{
    return data.json();
})
.then(res=>{
    console.log(res);
    console.log(res.result);
    let ele = "";
    res.result.forEach(item => {
        ele += `<li>
                    <a href="../pages/inlandproduct.html?productid=${item.productId}&title=国内折扣">
                        ${item.productImg}
                        <div class="title">${item.productName}</div>
                        <p class="price">${item.productPrice}</p>
                        <p class="from">${item.productFrom}${item.productTime}</p>
                    </a>
                </li>`
    });
    list.innerHTML = ele
})